﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Marmat.Forms.Skin
{
    /// <summary>
    /// 将提供数据供 System.Windows.Forms.TreeView.AfterCheck, ，System.Windows.Forms.TreeView.AfterCollapse,
    /// ，System.Windows.Forms.TreeView.AfterExpand, ，或 System.Windows.Forms.TreeView.AfterSelect 事件 System.Windows.Forms.TreeView 控件。
    /// </summary>
    public class TreeViewEventArgs : EventArgs
    {
        /// <summary>
        /// 新实例初始化 System.Windows.Forms.TreeViewEventArgs 指定的树节点的类。
        /// </summary>
        /// <param name="node">System.Windows.Forms.TreeNode 事件响应。</param>
        public TreeViewEventArgs(TreeNode node)
        {
            this.Node = node;
        }

        /// <summary>
        /// 新实例初始化 System.Windows.Forms.TreeViewEventArgs 类对于指定的树节点并具有指定类型引发该事件的操作。
        /// </summary>
        /// <param name="node">System.Windows.Forms.TreeNode 事件响应。</param>
        /// <param name="action">一种 System.Windows.Forms.TreeViewAction ，引发的事件。</param>
        public TreeViewEventArgs(TreeNode node, TreeViewAction action)
        {
            this.Node = node;
            this.Action = action;
        }
        /// <summary>
        /// 获取已选中、展开、折叠或选定的树节点。
        /// </summary>
        public TreeNode Node { get; }

        /// <summary>
        /// 获取引发该事件的操作的类型。
        /// </summary>
        public TreeViewAction Action { get; }
    }
}
